#!/bin/sh
# - test

. $LKP_SRC/lib/debug.sh

[ -d $BENCHMARK_ROOT/pm-qa ] || die "no $BENCHMARK_ROOT/pm-qa"

if [ "$test" = "all" ] || [ "$test" = "thermal" ]; then
	mkdir -p		/tmp/.X11-unix
	chmod 1777		/tmp/.X11-unix
	chown root:root		/tmp/.X11-unix

	# have a delay after start cpu_heat to make sure cpu_heat have been started when cpu is very busy
	[ -e $BENCHMARK_ROOT/pm-qa/thermal/thermal_03.sh ] && sed -i -e '/\$CPU_HEAT_BIN/a sleep 3' $BENCHMARK_ROOT/pm-qa/thermal/thermal_03.sh
	[ -e $BENCHMARK_ROOT/pm-qa/thermal/thermal_06.sh ] && sed -i -e '/\$CPU_HEAT_BIN/a sleep 3' $BENCHMARK_ROOT/pm-qa/thermal/thermal_06.sh

	xinit $LKP_SRC/programs/pm-qa/xinitrc
else
	$LKP_SRC/programs/pm-qa/xinitrc
fi
